#include <runtime_errors/landmark.h>
#include <vector>
#include <iostream>

int main()
{
    std::vector<Landmark> landmarks;
    landmarks.reserve( 6 );

    Landmark buoy1( 11.0, 3.1, 0.0, "buoy", 0 );
    Landmark buoy2( 11.5, 3.0, 0.0, "buoy", 1 );
    Landmark buoy3( 10.5, 2.9, 0.0, "buoy", 2 );
		// we have to have an ID for gate landmark as well, since we just have two constructor for this class and we have to have the right
	//arguments
	// if we don't put '0' as an ID for gate then no instance of counstructor matches the argument list
	Landmark gate(4.0, 2.5, 0.14, "gate", 0);
    Landmark pipe1( 6.0, 2.0, 0.2, "pipe", 0 );
    Landmark pipe2( 14.0, 3.0, 0.3, "pipe", 1 );

    // add all landmarks to "landmarks" in the order they were defined above
	/*! with these 6 lines of code, we insert all the above declared landmarks to the vector,
	Since push_back(), Adds a new element at the end of the vector, after its current last element	*/ 
    landmarks.push_back( buoy1 );
	landmarks.push_back( buoy2 );
	landmarks.push_back( buoy3 );
	landmarks.push_back( gate );
    landmarks.push_back( pipe1 );
    landmarks.push_back( pipe2 );

	/*! These lines of code start from the beginning of the landmarks vactor and cout the elements of the vector until it reaches
	the end of the vector*/
 
        std::vector<Landmark>::iterator landmarks_it = landmarks.begin();
        while( landmarks_it != landmarks.end() )
        {
            std::cout << landmarks_it->toString() << std::endl;

            ++landmarks_it;
        }

    return 0;
}
